3.2452 \(\int x^2 (a+b x^n) \, dx\)

Optimal. Leaf size=21 \[ \frac {a x^3}{3}+\frac {b x^{n+3}}{n+3} \]

[Out]

1/3*a*x^3+b*x^(3+n)/(3+n)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \[ \frac {a x^3}{3}+\frac {b x^{n+3}}{n+3} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*x^n),x]

[Out]

(a*x^3)/3 + (b*x^(3 + n))/(3 + n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int x^2 \left (a+b x^n\right ) \, dx &=\int \left (a x^2+b x^{2+n}\right ) \, dx\\ &=\frac {a x^3}{3}+\frac {b x^{3+n}}{3+n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 21, normalized size = 1.00 \[ \frac {a x^3}{3}+\frac {b x^{n+3}}{n+3} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*x^n),x]

[Out]

(a*x^3)/3 + (b*x^(3 + n))/(3 + n)

________________________________________________________________________________________

fricas [A]  time = 1.30, size = 28, normalized size = 1.33 \[ \frac {3 \, b x^{3} x^{n} + {\left (a n + 3 \, a\right )} x^{3}}{3 \, {\left (n + 3\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*x^n),x, algorithm="fricas")

[Out]

1/3*(3*b*x^3*x^n + (a*n + 3*a)*x^3)/(n + 3)

________________________________________________________________________________________

giac [A]  time = 0.19, size = 29, normalized size = 1.38 \[ \frac {3 \, b x^{3} x^{n} + a n x^{3} + 3 \, a x^{3}}{3 \, {\left (n + 3\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*x^n),x, algorithm="giac")

[Out]

1/3*(3*b*x^3*x^n + a*n*x^3 + 3*a*x^3)/(n + 3)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 23, normalized size = 1.10 \[ \frac {b \,x^{3} {\mathrm e}^{n \ln \relax (x )}}{n +3}+\frac {a \,x^{3}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*x^n),x)

[Out]

b/(n+3)*x^3*exp(n*ln(x))+1/3*a*x^3

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 19, normalized size = 0.90 \[ \frac {1}{3} \, a x^{3} + \frac {b x^{n + 3}}{n + 3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*x^n),x, algorithm="maxima")

[Out]

1/3*a*x^3 + b*x^(n + 3)/(n + 3)

________________________________________________________________________________________

mupad [B]  time = 1.26, size = 20, normalized size = 0.95 \[ \frac {a\,x^3}{3}+\frac {b\,x^n\,x^3}{n+3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*x^n),x)

[Out]

(a*x^3)/3 + (b*x^n*x^3)/(n + 3)

________________________________________________________________________________________

sympy [A]  time = 0.37, size = 51, normalized size = 2.43 \[ \begin {cases} \frac {a n x^{3}}{3 n + 9} + \frac {3 a x^{3}}{3 n + 9} + \frac {3 b x^{3} x^{n}}{3 n + 9} & \text {for}\: n \neq -3 \\\frac {a x^{3}}{3} + b \log {\relax (x )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*x**n),x)

[Out]

Piecewise((a*n*x**3/(3*n + 9) + 3*a*x**3/(3*n + 9) + 3*b*x**3*x**n/(3*n + 9), Ne(n, -3)), (a*x**3/3 + b*log(x)
, True))

________________________________________________________________________________________